/**
 * @file Popover style
 * @author leon <ludafa@outlook.com>
 */

@require '../css/func.styl'
@require '../css/variable.styl'

.sm-popover

    &-content
        position: absolute;
        transform: scale(0, 0)
        transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1)
        transition-duration: 400ms
        transition-delay: 0ms
        transition-property: opacity, transform
        transform-origin: 0 0
        opacity: 0
        z-index: $san-z-index.popover
        background-color: #fff

    &.state-open &-content
        transform: scale(1, 1);
        opacity: 1

    &.state-open.state-closing &-content
        transform: scale(0, 0);
        opacity: 0;

    for depth in '1' '2' '3' '4' '5'
        &.variant-shadow-{depth} &-content
            box-shadow: san-shadow(depth)
